<template>
    <div>
        <van-skeleton title avatar v-if="!ccc" />
        <p v-if="ccc">
            <van-image round width="10rem" height="10rem" src="https://fastly.jsdelivr.net/npm/@vant/assets/cat.jpeg" />
        </p>
        <van-skeleton title :row="2" v-if="!ccc" />
        <p v-if="ccc">
            <van-cell-group inset>
                <van-cell title="个人资料详情" is-link="" />
            </van-cell-group>
            <van-sidebar v-model="active">
                <van-sidebar-item title="订单信息"@click="ddxq"  />
                <van-sidebar-item title="订单信息"@click="ddxq"  />
                <van-sidebar-item title="订单信息"@click="ddxq"  />
            </van-sidebar>

            <van-cell-group inset>
                <van-cell title="订单信息" is-link="" @click="ddxq" />
            </van-cell-group>
            <van-cell-group inset>
                <van-cell title="我的设置" is-link="" />
            </van-cell-group>

        </p>
    </div>
</template>

<script setup>
import { useRouter } from 'vue-router';
const router = new useRouter()
import { useCounterStore } from '@/stores/my'
import { ref } from 'vue';
// 可以在组件中的任意位置访问 `store` 变量 ✨
const store = useCounterStore()
let ccc = ref(false)
setTimeout(() => {
    ccc.value = true
}, 1000)

const ddxq = () => {
    let token=localStorage.getItem('token')
    if(!token){
         router.push('/login')
    }else{
        router.push('/dindan')
    }
    
}
</script>

<style lang="scss" scoped></style>